var app = angular.module('app');

app.factory('stringUtilsService', [function () {
    var stringUtilsService = {};

    /**
     * get properties from a object
     */
    stringUtilsService.getChatLength = function (string) {
        if (!string) {
            return 0;
        }

        return string.replace(/[\u0391-\uFFE5]/g,"aa").length;
    };
    return stringUtilsService;
}]);